package com.example.springbootmybatis;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {
    @Select("select * from lsp")
    public List<User> findAll();

    @Insert("insert into lsp(id,name,password)" + "values (23,'chen','123456')")
    public int addUser(User user);
}
